import request from '@/utils/http/axios';
class DeptApi {

    static list(pageNum, pageSize) {
        return request({
            url: "/dept/list",
            params: {pageNum, pageSize},
            method: "get"
        })
    }

    static listAll() {
        return request({
            url: "/dept/listAll",
            method: "get"
        })
    }

    static addOrUpdate(dept){
        return request({
            url: "/dept/addOrUp",
            method: "post",
            data: dept
        })
    }

    static delete(deptId) {
        return request({
            url: "/dept/delete",
            method: "delete",
            params: {deptId}
        })
    }

}

export default DeptApi;